package com.atguigu.util;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author hfh
 * @version 1.0
 * @date 2022/8/29 20:21
 */
public class ThreadPoolUtil {
    private static ThreadPoolExecutor threadPoolExecutor=null;
    static {
        threadPoolExecutor=new ThreadPoolExecutor(5, 2000, 5 * 60L, TimeUnit.SECONDS, new LinkedBlockingDeque<Runnable>());
    }
    public static ThreadPoolExecutor threadPoolExecutor(){
        return threadPoolExecutor;
    }
}
